package no.ntnu.fp.handlers;

import no.ntnu.fp.handler.Handler;
import no.ntnu.fp.messages.Message;
import no.ntnu.fp.model.LoggedInModel;
import no.ntnu.fp.model.LoggedInModel.LoginError;

public class AlreadyLoggedInHandler implements Handler {

	private final LoggedInModel loggedInModel;
	
	public AlreadyLoggedInHandler(LoggedInModel loggedInModel) {
		this.loggedInModel = loggedInModel;
	}

	@Override
	public void handleMessage(Message message) {
		loggedInModel.setLoggedIn(false, LoginError.ALREADY_LOGGED_IN);
	}

}
